function registerUser() {
    let alert = document.getElementById("alert");
    alert.style.display = "none";
    let cid = document.getElementById("cid").value;
    let phone = document.getElementById("phone").value;
    let number = document.getElementById("number").value;
    let password = document.getElementById("password").value;
    let checkPassword = document.getElementById("check_password").value;
    if (cid == "" || password == "") {
        alert.innerHTML = "请输入ID和密码";
        alert.style.display = "block";
        return;
    }

    if (password.trim() != checkPassword.trim()) {
        alert.innerHTML = "请确认两次密码输入是否相等";
        alert.style.display = "block";
        return;
    }
    if (phone == "" || number == "") {
        alert.innerHTML = "请输入手机号码和身份证号";

        alert.style.display = "block";
        return;
    }
    axios
        .post("register", {
            cid:cid,
            phone: phone,
            password: password,
            number: number,
        })
        .then(function (response) {
            console.log(response);
            let redirect = response.data.redirect;
            if (redirect == "undefined" || redirect == null || redirect == "") {
                alert.innerHTML = response.data.info;
                alert.style.display = "block";
                return;
            }
            window.location = response.data.redirect;
        })
        .catch(function (error) {
            console.log(error);
        });
}